package com.xh3140.android.widgetdemo

import android.content.Intent
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.databinding.DataBindingUtil
import com.xh3140.android.widgetdemo.databinding.ActivityMainBinding

class MainActivity : AppCompatActivity() {
    private val binding: ActivityMainBinding by lazy {
        DataBindingUtil.setContentView(this, R.layout.activity_main)
    }

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(binding.root)

        binding.buttonButton.setOnClickListener {
            startActivity(Intent(this, ButtonActivity::class.java))
        }

        binding.buttonButtonGroup.setOnClickListener {
            startActivity(Intent(this, ButtonGroupActivity::class.java))
        }

        binding.buttonDialog.setOnClickListener {
            startActivity(Intent(this, DialogActivity::class.java))
        }
    }
}